package com.updesignsz.admin.service;

import com.updesignsz.admin.mapper.ArticleMapper;
import com.updesignsz.commom.entity.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 文章
 * Creation date 2020-8-8 15:06:05
 */
@Service
public class ArticleService {

	@Autowired
	private ArticleMapper articleMapper;



	public void deleteArticle(Integer id) {
		articleMapper.deleteArticle(id);
	}

	public List<Article> listAll(Article type) {
		return articleMapper.listAll(type);
	}

	public void saveArticle(Article form) {
		articleMapper.saveArticle(form);
	}

	public void updateArticle(Article form) {
		articleMapper.updateArticle(form);
	}

	public Article getById(Integer id) {
		return articleMapper.getById(id);
	}

}